package ihm;

import java.awt.BorderLayout;

import javax.swing.JButton;
import javax.swing.JPanel;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class JF_Principale extends javax.swing.JFrame {

	
	private static final long serialVersionUID = 1L;

	public JF_Principale()
	{
		
		JPanel monSuperPanel = new JPanel(new BorderLayout());
		getContentPane().add(monSuperPanel);
		
		JButton bouton = new JButton("Achtung");
		monSuperPanel.add(bouton, BorderLayout.NORTH);
		
		JButton boutonQuitter = new JButton("Quitter");
		monSuperPanel.add(boutonQuitter, BorderLayout.SOUTH);
		
				
		/*********************************/
		/**		ACTION LISTENER			**/
		/*********************************/
		
		bouton.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent evt)
			{
				System.out.println("TEST");
			}
		});
		
		boutonQuitter.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent evt)
			{
				System.exit(0);
			}
		});
		
		
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		setLocationRelativeTo(null);
		pack();		
		setVisible(true);
		
		
	}
}
